post = $('#post-body-<%= @post.id %>');
editor = post.find('.editor');
editable = post.find('.editable');

editable.addClass('hide');
editor.html("<%= escape_javascript(render :partial => 'sb_posts/edit', :locals => {:post => @post}) %>");

$.remove_rte()
$.rte_posts();

post.scrollTo();

$('#edit-post-<%= @post.id %>_spinner').addClass('hide');

editor.toggleClass('hide');
